#!/bin/bash
workingDir=$1
if [ "$workingDir" == '' ]
then
    workingDir='/cmsdata/cf/cf_program'
fi

# make necessary directories
if [ ! -d $workingDir/converted ]
then
    mkdir -p $workingDir/converted
fi
if [ ! -d $workingDir/yaml ]
then
    mkdir -p $workingDir/yaml
fi

ruby convert_str2int_rating.rb $workingDir
cat $workingDir/converted/scoredata_movie*out >> $workingDir/scoredata_movie
bash ./invert_serialized_hashmap.sh $workingDir
java -jar MahoutTest-0.0.1-SNAPSHOT-jar-with-dependencies.jar
ruby convert_int2str_similarity.rb


